package com.xy.curtain;

import com.xy.command.Command;

/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/16 21:06
 * @description
 */
public class CurtainOffCommand implements Command {
    private CurtainReceiver curtainReceiver;

    public CurtainOffCommand(CurtainReceiver curtainReceiver) {
        this.curtainReceiver = curtainReceiver;
    }

    @Override
    public void execute() {
        curtainReceiver.off();
    }

    @Override
    public void undo() {
        curtainReceiver.on();
    }
}
